package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.javaBean.LoginOutBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * author: FHP
 * data: on 2018\1\11 0011 16:17
 * E-Mail: 103945089@qq.com
 */
class SettingsModule {
    interface SettingListener{
        fun loginOutover(loginOutBean: LoginOutBean)
        fun showLoading()
    }
    fun loginOut(settingListener: SettingListener){
        UrlApis.logOut()
                .doOnSubscribe {
                    settingListener.showLoading()
                }
                .subscribe {
                    data->
                    settingListener.loginOutover(data)
                }
    }
}